package com.yitongmao.info;

import android.view.View;

/*
* 作者：梁伟航 on 2017/7/31 14:46
* 类的用途：
*/
public abstract class OnConvertViewClickListener implements View.OnClickListener {


    private View convertViews;
    private int[] positionIds;
    public OnConvertViewClickListener(View convertView, int... positionIds) {
        this.convertViews = convertView;
        this.positionIds = positionIds;
    }


    @Override
    public void onClick(View v) {
        int len = positionIds.length;
        int[] positions = new int[len];
        for(int i = 0; i < len; i++){
            positions[i] = (Integer) convertViews.getTag(positionIds[i]);
        }
        onClickCallBack(v, positions);
    }

    public abstract void onClickCallBack(View registedView, int... positionIds);


}
